<template>
  <div class="Fellowship-detail pages-box">
    <div class="header flex-center">
      <i class="iconfont icon-dajiantou" @click="$router.go(-1)"></i>联谊详情
    </div>
    <div class="section">
      <div class="top-box">
        <img class="img" v-lazy="ImgDomin(info.coverImg)" alt="" />
        <div class="con">
          <div class="top">
            <div class="title">{{ info.title }}</div>
            <div class="time">征集组团截至时间：{{ info.activeEnd }}</div>
          </div>
          <div class="bottom">
            <i class="iconfont icon-31dingwei"></i>
            <span>{{ info.fellowshipAddr || "--" }}</span>
          </div>
        </div>
      </div>
      <div class="content">
        <div class="title">活动信息</div>
        <div class="info-con">
          <div class="label">组织单位</div>
          <div class="value">{{ info.organization || "--" }}</div>
        </div>
        <div class="info-con">
          <div class="label">单位类别</div>
          <div class="value">{{ info.unitClass || "--" }}</div>
        </div>
        <div class="info-con">
          <div class="label">经费承担</div>
          <div class="value">{{ info.undertaking || "--" }}</div>
        </div>
        <div class="info-con">
          <div class="label">联谊时间</div>
          <div class="value">{{ info.activeStart }}</div>
        </div>
        <div class="info-con">
          <div class="label">主办方</div>
          <div class="value">{{ info.sponsor || "--" }}</div>
        </div>
        <div class="info-con">
          <div class="label">联系电话</div>
          <div class="value">{{ info.phone || "--" }}</div>
        </div>
        <div class="info-con">
          <div class="label">活动总人数</div>
          <div class="value">{{ info.overallNum || 0 }}</div>
        </div>
        <div class="info-con">
          <div class="label">男士</div>
          <div class="value">{{ info.manNum || 0 }}</div>
        </div>
        <div class="info-con">
          <div class="label">女士</div>
          <div class="value">{{ info.womanNum || 0 }}</div>
        </div>
      </div>
      <div class="content">
        <div class="title">受邀信息</div>
        <div class="info-con">
          <div class="label">期待行业</div>
          <div class="value">{{ info.trade || "--" }}</div>
        </div>
        <div class="info-con">
          <div class="label">期待人数</div>
          <div class="value">{{ info.forwardTotal || 0 }}</div>
        </div>
        <div class="info-con">
          <div class="label">男士</div>
          <div class="value">{{ info.forwardManNum || 0 }}</div>
        </div>
        <div class="info-con">
          <div class="label">女士</div>
          <div class="value">{{ info.forwardWomanNum || 0 }}</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { getFellowshipInfo } from "@/api/fellowship";
export default {
  data() {
    return {
      info: {
        title: "周六见面日交友活动",
        time: "2021-09-2",
        address: "南苑冬梅路好望公园",
        danwei: "临平街道办事处",
      },
    };
  },
  created() {
    this.getInfo();
  },
  methods: {
    getInfo() {
      getFellowshipInfo({
        id: this.$route.query.id,
      })
        .then((res) => {
          if (res.code == 0) {
            res.data.forwardTotal =
              res.data.forwardManNum + res.data.forwardWomanNum;
            this.info = res.data;
          } else {
            this.$toast(res.msg);
          }
        })
        .catch((err) => {
          this.$toast("数据获取失败，请稍后重试！");
        });
    },
  },
};
</script>
<style lang="less" scoped>
@import url("../assets/css/fellowship-detail.less");
</style>
